package com.zxh.listdemo.adapter.list;

import com.zxh.listdemo.R;
import com.zxh.listdemo.adapter.list.common.BaseListAdapter;
import com.zxh.listdemo.adapter.list.common.BaseViewHolder;
import com.zxh.listdemo.model.OneModel;

import java.util.List;

/**
 * Created by zhangxuehui on 2018/2/27.
 */

public class OneBaseAdapter extends BaseListAdapter<OneModel> {


    public OneBaseAdapter(List<OneModel> list, int layoutId) {
        super(list, layoutId);
    }

    @Override
    public void convert(BaseViewHolder holder, int pos) {
        OneModel model = getItem(pos);
        holder.setText(R.id.tv_title, model.getTitle())
                .setText(R.id.tv_desc, model.getDesc())
                .setImageUrl(R.id.iv_icon, model.getLink());
    }
}
